<template>
  <section v-if="distinctToAddressLength"
           class="shipment-sender-info">
    <p>
      {{ distinctToAddressLength }}送
      <br />
      <template v-for="(item, index) in distinctToAddress">
        <span :key="index">
          {{item.address}}；</span>
      </template>
    </p>
  </section>
</template>

<script>
export default {
  name: "CombineConsigneeSenderAddress",
  props: {
    row: {
      type: Object,
      default: () => { }
    }
  },
  computed: {
    distinctToAddressLength () {
      const { distinctToAddress } = this.row;
      return distinctToAddress?.length || 0
    },
    distinctToAddress () {
      const { distinctToAddress } = this.row;
      return distinctToAddress || []
    }
  },
};
</script>
<style scoped>
.shipment-sender-info p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
</style>
